package com.qitianyong.selfclass;

/**
 * Created by qitianyong on 2017/3/15.
 */

public class CommandMessage {

    public int command;
    public Object message;

    public CommandMessage() {
    }

    public CommandMessage(int command, Object message) {
        this.command = command;
        this.message = message;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CommandMessage that = (CommandMessage) o;

        if (command != that.command) return false;
        return message != null ? message.equals(that.message) : that.message == null;

    }

    @Override
    public int hashCode() {
        int result = command;
        result = 31 * result + (message != null ? message.hashCode() : 0);
        return result;
    }
}
